using System;
using System.Data;
using System.Collections.Generic;
using Soccer.Core;
using Soccer.Utility;

namespace Soccer.Business
{
    [TableAttribute("Scores")]
	[Serializable]
    public class Score : DBO<Score>
    {
		#region Fields
		
		private int? _IdScore;
		private string _Score;
		private string _ScoreType;
		
		#endregion
		
		#region Constructors
		/// <summary>
		/// Default constructor
		/// </summary>
		public Score()
		{
			
		}
		
		/// <summary>
		/// Constructor with IdScore 
		/// </summary>
		/// <param name="IdScore">The IdScore</param>
		public Score(int? IdScore )
		{
			this.IdScore = IdScore;
		}
		
		/// <summary>
		/// Constructor with all parameters
		/// </summary>
		/// <param name="IdScore">Sets int? value for IdScore</param>
		/// <param name="Score">Sets string value for Score</param>
		/// <param name="ScoreType">Sets string value for ScoreType</param>
		public Score(int? idScore, string score, string scoreType)
		{
			this.IdScore = idScore;
			this.Score1 = score;
			this.ScoreType = scoreType;
		}
		
		#endregion
		
		#region Properties
		
		/// <summary>
		/// Gets or sets int? value for IdScore
		/// </summary>
		[ColumnAttribute("IdScore", SqlDbType.Int , 4 , true, true, false)]
		public int? IdScore
		{
			set
			{
				this._IdScore = value;
			}
			get
			{
				return this._IdScore;
			}
		}
		
		/// <summary>
		/// Gets or sets string value for Score
		/// </summary>
		[ColumnAttribute("Score", SqlDbType.NVarChar , 50 , false, false, true)]
		public string Score1
		{
			set
			{
				this._Score = value;
			}
			get
			{
				return this._Score;
			}
		}
		
		/// <summary>
		/// Gets or sets string value for ScoreType
		/// </summary>
		[ColumnAttribute("ScoreType", SqlDbType.NVarChar , 50 , false, false, true)]
		public string ScoreType
		{
			set
			{
				this._ScoreType = value;
			}
			get
			{
				return this._ScoreType;
			}
		}
		
		
		/// <summary>
		/// Get a list ScoreOdd of current Score object base on IdScore
		/// </summary>
		public List<ScoreOdd> ScoreOddListForIdScore
		{
			get
			{
				if (this.IdScore == null)
					return null;
				ScoreOdd condition = new ScoreOdd();
				condition.IdScore = this.IdScore;
				return ScoreOddController.FindItems(condition);
			}
		}
		
		/// <summary>
		/// Get a list ScorePredict of current Score object base on IdScore
		/// </summary>
		public List<ScorePredict> ScorePredictListForIdScore
		{
			get
			{
				if (this.IdScore == null)
					return null;
				ScorePredict condition = new ScorePredict();
				condition.IdScore = this.IdScore;
				return ScorePredictController.FindItems(condition);
			}
		}
		
		#endregion
        
        #region Other Properties
        private static ColumnNameStruct? _ColumnName;
        public static ColumnNameStruct ColumnName
        {
            get
            {
                if (!_ColumnName.HasValue)
                    _ColumnName = new ColumnNameStruct();
                return _ColumnName.Value;
            }
        }
        #endregion

        #region NestedType
        public  struct ColumnNameStruct
        {
            /// <summary>
            /// Get the name of column [IdScore]
            /// </summary>
            public string IdScore
            {
                get
                {
                    return "IdScore";
                }
            }
            /// <summary>
            /// Get the name of column [Score]
            /// </summary>
            public string Score
            {
                get
                {
                    return "Score";
                }
            }
            /// <summary>
            /// Get the name of column [ScoreType]
            /// </summary>
            public string ScoreType
            {
                get
                {
                    return "ScoreType";
                }
            }
        }
        #endregion
    }
}
